$(document).ready(function(){
	$('#submit_bind').click(function(){
	    var card_name = $.trim($("#card_name").val());
	    var card_no = $.trim($("#card_number").val());
	    if(card_name==""||card_no==""){
	    	alert("支付宝账号或者真名为空");return;
	    }
	    
	    //开始提交给数据库
	    var data ={card_user:card_name,card_number:card_no};
	    $.post('index.php?c=alipay&a=bindAlipay',data,function(rs){
	    	rs=eval("("+rs+")");
			if(rs.recode==1){
				window.location.reload();
				return false;
			}
			if(rs.recode==0){
				return false;
			}
	    });

	});
})

function delete_card(id){
	$.post("index.php?c=alipay&a=delete",{id:id},function(rs){
		rs=eval("("+rs+")");
		if(rs.recode==1){
			window.location.reload();
			return false;
		}
		if(rs.recode==0){
			return false;
		}

	});
}